package team.yidong.fenda.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import team.yidong.fenda.entity.SysRolePermission;
import team.yidong.fenda.entity.SysUserRole;

import java.util.List;

/**
 * Created by xuanlong on 2018/1/28.
 */
@Repository
public interface SysRolePermissionRepository extends JpaRepository<SysRolePermission, Integer> {
    List<SysRolePermission> findByRoleId(Integer roleId);

    SysRolePermission findByPermissionIdAndRoleId(Integer permissionId, Integer roleId);

}
